Skip to content

Fix: Empty build.excludes or build.includes array breaks the build (fixes #3786)#3787

Merged
oliverfoster merged 1 commit intomasterfrom
issue/3786
Apr 13, 2026
Merged

Fix: Empty build.excludes or build.includes array breaks the build (fixes #3786)#3787
oliverfoster merged 1 commit intomasterfrom
issue/3786

Conversation

@swashbuck
Copy link
Copy Markdown
Contributor

Fixes #3786

Fix

  • Add .length checks to the includes, excludes, and productionExcludes guards in generateConfigData() so empty arrays are treated the same as undefined

Empty arrays are truthy in JavaScript, so if (buildConfig.excludes) passes for []. This propagates into generateExcludedRegExp() where [].map(...).join('|') produces an empty string, and new RegExp('', 'i') matches every file path - silently excluding all plugins.

Testing

  1. Set "build": { "excludes": [] } in config.json
  2. Run grunt build - verify the build completes normally (no applyDefaults error)
  3. Set "build": { "includes": [] } in config.json
  4. Run grunt build - verify the build completes normally
  5. Remove the build key entirely - verify the build still works (regression check)

@oliverfoster oliverfoster merged commit d05239f into master Apr 13, 2026
2 checks passed
@oliverfoster oliverfoster deleted the issue/3786 branch April 13, 2026 09:14
@github-project-automation github-project-automation bot moved this from Needs Reviewing to Recently Released in adapt_framework: The TODO Board Apr 13, 2026
github-actions bot pushed a commit that referenced this pull request Apr 13, 2026
# [5.56.0](v5.55.2...v5.56.0) (2026-04-13)

### Chore

* Bump axios from 1.8.4 to 1.15.0 (#3794) ([e3c5b46](e3c5b46)), closes [#3794](#3794)
* Bump brace-expansion from 1.1.12 to 1.1.13 (#3792) ([3ef184a](3ef184a)), closes [#3792](#3792)
* Bump fast-xml-parser from 4.5.0 to 4.5.6 (#3793) ([785578e](785578e)), closes [#3793](#3793)
* Bump flatted from 3.2.9 to 3.4.2 (#3779) ([5d856fd](5d856fd)), closes [#3779](#3779)
* Bump handlebars from 4.7.8 to 4.7.9 (#3783) ([ef38e55](ef38e55)), closes [#3783](#3783)
* Bump lodash from 4.17.21 to 4.17.23 (#3750) ([ee264d8](ee264d8)), closes [#3750](#3750)
* Bump lodash from 4.17.23 to 4.18.1 (#3789) ([079e907](079e907)), closes [#3789](#3789)
* Bump lodash-es from 4.17.21 to 4.17.23 (#3749) ([b7d17e0](b7d17e0)), closes [#3749](#3749)
* Bump lodash-es from 4.17.23 to 4.18.1 (#3790) ([718e128](718e128)), closes [#3790](#3790)
* Bump picomatch (#3782) ([934455e](934455e)), closes [#3782](#3782)
* Bump qs from 6.14.1 to 6.14.2 (#3759) ([8e6a7e8](8e6a7e8)), closes [#3759](#3759)
* Bump rollup from 2.79.2 to 2.80.0 (#3767) ([6d3b700](6d3b700)), closes [#3767](#3767)
* Bump serialize-javascript and @rollup/plugin-terser (#3791) ([b36da6c](b36da6c)), closes [#3791](#3791)
* Bump svgo from 3.3.2 to 3.3.3 (#3770) ([5de7d51](5de7d51)), closes [#3770](#3770)
* Bump tar and npm (#3772) ([7a6981f](7a6981f)), closes [#3772](#3772)
* Bump tar and semantic-release (#3751) ([fb61128](fb61128)), closes [#3751](#3751)
* Bump underscore from 1.13.7 to 1.13.8 (#3769) ([68b9654](68b9654)), closes [#3769](#3769)
* Bump undici and @actions/http-client (#3780) ([a908d05](a908d05)), closes [#3780](#3780)

### Fix

* Bumping core to v6.73.1 automatically via 'frameworkpullrequest' Github action (#3755) ([85fc56b](85fc56b)), closes [#3755](#3755)
* Bumping core to v6.74.0 automatically via 'frameworkpullrequest' Github action (#3756) ([bc3cfbd](bc3cfbd)), closes [#3756](#3756)
* Bumping core to v6.75.0 automatically via 'frameworkpullrequest' Github action (#3763) ([d68dd7d](d68dd7d)), closes [#3763](#3763)
* Fail fast when multiple themes are active in a build (fixes #3784) (#3785) ([09720b9](09720b9)), closes [#3784](#3784) [#3785](#3785)
* Implement semantic-release-config, fix broken automated releases (fixes #3774) (#3775) ([bb20081](bb20081)), closes [#3774](#3774) [#3775](#3775)
* Treat empty includes/excludes arrays as unset (#3787) ([d05239f](d05239f)), closes [#3787](#3787)

### Update

* Bump adapt-migrations version in package-lock.json (fix #3752) ([5096e30](5096e30)), closes [#3752](#3752)
* Skip timestamp updates in development builds (fix #3706) #3764 ([827edb0](827edb0)), closes [#3706](#3706) [#3764](#3764)
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 5.56.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Recently Released

Development

Successfully merging this pull request may close these issues.

Fix: Empty build.excludes or build.includes array breaks the build

2 participants